package com.example.demo.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.example.demo.entity.Shop;
import com.example.demo.entity.Shopcard1;
import com.example.demo.mapper.Shop1Mapper;
import com.example.demo.service.Shop1Service;
import com.example.demo.service.ShopService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

@Service
public class Shop1Impl extends ServiceImpl<Shop1Mapper, Shopcard1> implements Shop1Service {

    @Resource
    public Shop1Mapper shop1Mapper;

  public Integer addtocard(Integer commodityid,Integer number,Integer relaid){
      if(shop1Mapper.pandun1(commodityid,relaid)==null){
          shop1Mapper.addshopcard1(commodityid,number,relaid);
          return 1;
      }
return 0;
  }

}
